package com.ks.jetty;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ResourceHandler;


/**jetty简单应用，在浏览器显示文件夹的内容 new Server(8080)指定访问的端口号
 * @author 47475
 *
 */
public class TestHttpServer {
	/**
	 *
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		Server server = new Server(8089);
		ResourceHandler resourceHandler = new ResourceHandler();
		resourceHandler.setResourceBase("c:/");
		resourceHandler.setDirectoriesListed(true);
		server.setHandler(resourceHandler);
		server.start();
	}
}
